package com.payment.service.impl;

import com.payment.entity.common.UserOrderPackage;
import com.payment.mapper.UserOrderPackageMapper;
import com.payment.service.UserOrderPackageService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Transactional
@Service
public class UserOrderPackageServiceImpl implements UserOrderPackageService {
    @Resource
    UserOrderPackageMapper orderPackageMapper;

    @Override
    public int findPayIdByNotify(String payId) {
        return orderPackageMapper.findPayIdByNotify(payId);
    }

    @Override
    public Integer updateWeiXinPayRst(UserOrderPackage order) {
        return orderPackageMapper.updateWeiXinPayRst(order);
    }

    @Override
    public List<UserOrderPackage> queryOrderByPayIdAndAmount(String payId, String payAmount) {
        return orderPackageMapper.queryOrderByPayIdAndAmount(payId, payAmount);
    }

    @Override
    public void updateWeiXinIsNotify(UserOrderPackage user) {
        orderPackageMapper.updateWeiXinIsNotify(user);
    }

    @Override
    public int findOrderIdByNotify(String orderId) {
        return orderPackageMapper.findOrderIdByNotify(orderId);
    }

    @Override
    public List<UserOrderPackage> queryOrderByOrderIdAndAmount(String orderId, String paymentAmount) {
        return orderPackageMapper.queryOrderByOrderIdAndAmount(orderId, paymentAmount);
    }

    @Override
    public void updateCallbackPayRst(UserOrderPackage order) {
        orderPackageMapper.updateCallbackPayRst(order);
    }

    @Override
    public void updateCallbackIsNotify(UserOrderPackage user) {
        orderPackageMapper.updateCallbackIsNotify(user);
    }

    @Override
    public List<UserOrderPackage> queryDeviceCodeByPayId(String payId) {
        return orderPackageMapper.queryDeviceCodeByPayId(payId);
    }

    @Override
    public void dataTransfer() {
        orderPackageMapper.dataTransfer();
    }

    @Override
    public void originalDataDelete() {
        orderPackageMapper.originalDataDelete();
    }

    @Override
    public List<UserOrderPackage> getChannelResultList() {
        return orderPackageMapper.getChannelResultList();
    }

    @Override
    public void updateyIsPartnerNotity(UserOrderPackage re) {
        orderPackageMapper.updateyIsPartnerNotity(re);
    }

    @Override
    public List<UserOrderPackage> getPackageListByOutNo(String out_trade_no) {
        return orderPackageMapper.getPackageListByOutNo(out_trade_no);
    }

    @Override
    public Integer updatePayRstForHist(UserOrderPackage order) {
        return orderPackageMapper.updatePayRstForHist(order);
    }

    @Override
    public List<UserOrderPackage> queryOrderList(String payId) {
        return orderPackageMapper.queryOrderList(payId);
    }

    @Override
    public Integer insertOrderToOrderT(UserOrderPackage order) {
        return orderPackageMapper.insertOrderToOrderT(order);
    }

    @Override
    public int findPayIdCount(String payId) {
        return orderPackageMapper.findPayIdCount(payId);
    }

}
